package com.traffic.trafficLine;

import com.traffic.entity.TrafficLine;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface TrafficLineService {
	
  void	addTrafficLine(TrafficLine t);
  void delTrafficLine(Long id);
  void updateTrafficLine(TrafficLine t);

  public List<TrafficLine> findAll();
  public Page<TrafficLine> findTrafficLine(Pageable page);

  public Page<TrafficLine> findTrafficLineByLine(String line, Pageable page);
  public List<TrafficLine> findTrafficLineByLine(String line);

  public Page<TrafficLine> findTrafficLineByRoad(String road, Pageable page);
  public Page<TrafficLine> findAllByStartroadAndEndroad(String startroad, String endroad, Pageable page);


  public Page<TrafficLine> findAllByLineOrStartroadOrEndroad(String line,String startroad, String endroad, Pageable page);

  /**
   * 根据主键查询
   *
   * @param id
   * @return
   */
  TrafficLine get(Long id);
}
